using UnityEditor;
using UnityEngine;

namespace BitBenderGames
{
    [CustomEditor(typeof(TouchCameraController))]
    public class TouchCameraControllerEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            
            if (GUILayout.Button("应用当前BoundRect", new GUIStyle("AC Button")))
            {
                TouchCameraController touchCameraController = target as TouchCameraController;
                if (touchCameraController)
                {
                    touchCameraController.SetCameraBoundary(touchCameraController.GetBoundRect());
                }
            }
        }
    }
}

